<?php
/**
 * Created by PhpStorm.
 * User: u
 * Date: 2018/11/20
 * Time: 16:48
 */
namespace common\sources\read\taobao;

use common\models\craftsman\TaoBao;

class TaoBaoAccess implements  ITaoBaoAccess
{
    public function getList($buyerId)
    {
        return TaoBao::find()
                ->select("id,tbname,pro_name,pro_code,city_name,city_code,area_name,area_code,addr,audit_status,takephone,reason")
                ->where(["buy_id" =>$buyerId])
                ->asArray()
                ->all();
    }
    //查看绑定个数
    public function getCount($buyerId)
    {
        return TaoBao::find()
                ->where(['buy_id'=>$buyerId])
                ->count();

    }

}